import { http } from "@/utils/http.js";

// 名额券列表
export const rolledlist = (data) => {
  return http.request({
    method: "get",
    url: "/rolled/list",
    params: {
      ...data,
      //   offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

// 名额券详情
export const rolledetail = (data) => {
  return http.request({
    method: "get",
    url: "/rolled/detail",
    params: {
      ...data,
      //   offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

// 名额券详情
export const upgradeUserQuery = (data) => {
  return http.request({
    method: "get",
    url: "/rolled/upgradeUserQuery",
    params: {
      ...data,
      //   offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

// 名额券详情
export const agencyUserQuery = (data) => {
  return http.request({
    method: "get",
    url: "/rolled/agencyUserQuery",
    params: {
      ...data,
      //   offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

// 名额券详情
export const useUpgrade = (data) => {
  return http.request({
    method: "post",
    url: "/rolled/useUpgrade",
    data: {
      ...data,
      //   offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

// 名额券详情
export const useAgency = (data) => {
  return http.request({
    method: "post",
    url: "/rolled/useAgency",
    data: {
      ...data,
      //   offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

// 名额券列表
export const lowerList = (data) => {
  return http.request({
    method: "get",
    url: "/user/lowerList",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

// 名额券列表
export const lowerCount = (data) => {
  return http.request({
    method: "get",
    url: "/user/lowerCount",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const rolledcount = (data) => {
  return http.request({
    method: "get",
    url: "/rolled/count",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

// export const agencyUserQuery = (data) => {
//   return http.request({
//     method: "get",
//     url: "/rolled/agencyUserQuery",
//     params: {
//       ...data,
//       offLoading: true, // 加参数关闭api请求全局加载中提示
//     },
//   });
// };

export const userareaLower = (data) => {
  return http.request({
    method: "get",
    url: "/shop/agency",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const shopQrcode = (data) => {
  return http.request({
    method: "get",
    url: "/shop/qrcode",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};
